{% extends "public/layout.html" %}

{% block body %}
<form class="form-horizontal" method="post">
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
    <div class="col-sm-5">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email" value="{{ user_obj.email }}" disabled>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">部门</label>
    <div class="col-sm-5">
        <select class="form-control" name="department">
            <option value="0">请选择部门</option>
            {% for department in departments %}
            <option value="{{ department.id }}" {% if department.id == user_obj.profile.department.id %}selected{% endif %}>
                {{ department.name }}</option>
            {% endfor %}
        </select>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <input type="hidden" name="id" value="{{ user_obj.id }}">
      <button type="submit" class="btn btn-primary">提交</button>
    </div>
  </div>
</form>
{% endblock %}
